/*
 * Token.cpp
 *
 *  Created on: 14/04/2009
 *      Author: evellyn, tamer, t�rsis
 */

#include "Token.h"
#include "Classificator.h"

Token::Token() {
}

void Token::setToken(int l, int col, int type, string lex) {
	Classificator classificator;

	column = col;
	line = l;
	value = lex;
	class_ = classificator.getClass(type, lex);
}

string Token::getValue() {
	return this->value;
}

string Token::getClass_() {
	return this->class_;
}

string Token::getToken() {
	string l;
	string c;
	ostringstream ol;
	ostringstream oc;

	ol << line;
	oc << column;

	l = ol.str();
	c = oc.str();

	return class_ + " " + value + " " + l + " " + c;
}
